Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix order filter date #999

Merged
merged 2 commits into from
Jan 6, 2025
Merged

Fix order filter date #999

merged 2 commits into from
Jan 6, 2025

Conversation

kernicPanel
Copy link
Member

Purpose

A test about order filtering on creation date was flaky, it was about results ordering.
While digging for a fix, it appears that when we filter on a date, only orders created at 0:00 were found.

Also, a Django deprecation about datetime_safe was raised.

Proposal

  • Remove datetime_safe usage
  • Filter created_on by date instead of exact string

@kernicPanel kernicPanel force-pushed the fix-order-filter-date branch 2 times, most recently from 76520db to a1fe7ed Compare December 20, 2024 15:43
Django is deprecating datetime_safe usage.
Order filtering is matching created_on date exactly, which only matches
times at 0:00, as query parameter only contains a date.
@kernicPanel kernicPanel force-pushed the fix-order-filter-date branch from a1fe7ed to 2f33ac3 Compare January 6, 2025 09:59
@kernicPanel kernicPanel enabled auto-merge (rebase) January 6, 2025 10:02
@kernicPanel kernicPanel disabled auto-merge January 6, 2025 10:02
@kernicPanel kernicPanel force-pushed the fix-order-filter-date branch from 33222f1 to 2f33ac3 Compare January 6, 2025 10:03
@kernicPanel kernicPanel merged commit 2120de2 into main Jan 6, 2025
17 checks passed
@kernicPanel kernicPanel deleted the fix-order-filter-date branch January 6, 2025 10:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants